﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class Manage_DatePicker : System.Web.UI.UserControl
{
    public string Text
    {
        get
        {
            return getDate();
        }
        set
        {
            tbDate.Text = value;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public string getDate()
    {
        return tbDate.Text;
    }
    public DateTime getDateTime()
    {
        DateTime time;
        try
        {
            time = Convert.ToDateTime(getDate());
        }
        catch
        {
            time = DateTime.Now;
        }
        return time;
    }

    public void clear()
    {
        tbDate.Text = "";
    }
}